﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OgonPhonesXML.Aastra.Serializer
{
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
    public partial class AastraIPPhoneImageMenu
    {
        private imageType imageField;

        private AastraIPPhoneImageMenuURI[] uRIListField;
        private List<AastraIPPhoneImageMenuURI> listImageMenuUri = new List<AastraIPPhoneImageMenuURI>();

        private softKeyType[] softKeyField;
        private List<softKeyType> listSoftKey = new List<softKeyType>();

        private iconListTypeIcon[] iconListField;
        private List<iconListTypeIcon> listIconType = new List<iconListTypeIcon>();

        private string destroyOnExitField;

        private string beepField;

        private string lockInField;

        private string timeoutField;

        private string cancelActionField;

        public AastraIPPhoneImageMenu()
        {
            this.destroyOnExitField = "no";
            this.beepField = "no";
            this.lockInField = "no";
            this.timeoutField = "45";
        }
        public void addImageMenu(string text, string key)
        {
            AastraIPPhoneImageMenuURI psvImageURI = new AastraIPPhoneImageMenuURI();
            String[] finalText = { text };
            psvImageURI.Text = finalText;
            psvImageURI.key = key;
            listImageMenuUri.Add(psvImageURI);

        }
        public void addSoftKey(string label, string uri, string index)
        {
            softKeyType psvSoftKey = new softKeyType();
            psvSoftKey.Label = label;
            psvSoftKey.URI = uri;
            psvSoftKey.index = index;
            listSoftKey.Add(psvSoftKey);
        }
        public void addSoftKey(string label, string uri, string index, string icon)
        {
            softKeyType psvSoftKey = new softKeyType();
            psvSoftKey.Label = label;
            psvSoftKey.URI = uri;
            psvSoftKey.index = index;
            psvSoftKey.icon = icon;
            listSoftKey.Add(psvSoftKey);
        }
        public void addIcon(string text, string index)
        {
            iconListTypeIcon psvIconList = new iconListTypeIcon();
            String[] finalText = { text };
            psvIconList.Text = finalText;
            psvIconList.index = index;
            listIconType.Add(psvIconList);
        }
        public void addImageField(string height, string width)
        {
            imageField = new imageType();
            imageField.height = height;
            imageField.width = width;             
        }
        public void addImageField(string height, string width, string vAlign, string hAlign)
        {
            imageField = new imageType();
            imageField.height = height;
            imageField.width = width;
            imageField.verticalAlign = vAlign;
            imageField.horizontalAlign = hAlign;
        }
        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public imageType Image
        {
            get
            {
                return this.imageField;
            }
            set
            {
                this.imageField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        [System.Xml.Serialization.XmlArrayItemAttribute("URI", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
        public AastraIPPhoneImageMenuURI[] URIList
        {
            get
            {
                this.uRIListField = listImageMenuUri.ToArray();
                return this.uRIListField;
            }
            set
            {
                this.uRIListField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute("SoftKey", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public softKeyType[] SoftKey
        {
            get
            {
                this.softKeyField = listSoftKey.ToArray();
                return this.softKeyField;
            }
            set
            {
                this.softKeyField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        [System.Xml.Serialization.XmlArrayItemAttribute("Icon", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
        public iconListTypeIcon[] IconList
        {
            get
            {
                this.iconListField = listIconType.ToArray();
                return this.iconListField;
            }
            set
            {
                this.iconListField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string destroyOnExit
        {
            get
            {
                return this.destroyOnExitField;
            }
            set
            {
                this.destroyOnExitField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string Beep
        {
            get
            {
                return this.beepField;
            }
            set
            {
                this.beepField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string LockIn
        {
            get
            {
                return this.lockInField;
            }
            set
            {
                this.lockInField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "integer")]
        [System.ComponentModel.DefaultValueAttribute("45")]
        public string Timeout
        {
            get
            {
                return this.timeoutField;
            }
            set
            {
                this.timeoutField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string cancelAction
        {
            get
            {
                return this.cancelActionField;
            }
            set
            {
                this.cancelActionField = value;
            }
        }
    }
}
